﻿@model ScrumTracker.Models.Story
@{
    Layout = "~/Views/Shared/_Layout5.cshtml";
    ViewBag.Title = "Edit";
}
@if (false)
{
    <script src="../../Scripts/jquery-1.5.1-vsdoc.js" type="text/javascript"></script>
}
@section head{
    <script type="text/javascript">
        $(function () {
            $('form[rel=delete]').submit(function (e) {
                if (confirm("Are you sure?")) {
                    return true;
                }
                else {
                    e.preventDefault();
                    return false;
                }
            });
        });
    </script>
}
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" style="overflow: hidden;">
    <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
        <li class="ui-state-default ui-corner-top">
            <a href="@Url.Action("Get", "Stories", new { @id = Model.IssueId })">Story Details</a></li>
        <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active">
            <a href="@Url.Action("Edit", "Stories", new { @id = Model.IssueId })">Edit</a></li>
    </ul>
    <div class="ui-tabs-panel ui-widget-content ui-corner-bottom">
        @using (Html.BeginForm("Update", "Stories"))
        {
            @Html.EditorForModel()
            <input type="submit" class="button" value="Submit" />
        }
        <hr style="margin-top: 20px;" />
        <div>
            @using (Html.BeginForm("Delete", "Stories", FormMethod.Post, new { rel = "delete" }))
            {
                @Html.AntiForgeryToken()
                <span>Do you want to delete the sprint?</span> <input type="submit" class="button" value="Delete" />
            }
        </div>
    </div>
</div>
